package server;

import java.rmi.Remote;
import java.rmi.RemoteException;

public interface FirewallSession extends Remote {

	public boolean isExpert() throws RemoteException;
	public boolean isReadWrite() throws RemoteException;
	
	public void turnOn() throws RemoteException, FirewallException, ReadWriteException;
	public void turnOff() throws RemoteException, FirewallException, ReadWriteException;
	
	public boolean isLogEnabled() throws RemoteException;
	public void enableLog() throws RemoteException, FirewallException, ReadWriteException;
	public void disableLog() throws RemoteException, FirewallException, ReadWriteException;
	
	public void addRule(RulesTableType dir, String ruleset, Rule rule) throws RemoteException, FirewallException, ReadWriteException, NotExpertException;
	public void deleteRule(RulesTableType dir, String ruleset, int index) throws RemoteException, FirewallException, ReadWriteException, NotExpertException;
	public Rule[] getRules(RulesTableType dir, String ruleset) throws RemoteException, FirewallException;
	
	public void addProtocol(Protocol protocol) throws RemoteException, FirewallException, ReadWriteException, NotExpertException;
	public void deleteProtocol(String name) throws RemoteException, FirewallException, ReadWriteException, NotExpertException;
	public void updateProtocol(Protocol protocol) throws RemoteException, FirewallException, ReadWriteException, NotExpertException;
	public Protocol[] getProtocols() throws RemoteException, FirewallException;
	
	public void createRuleSet(String name) throws RemoteException, FirewallException, ReadWriteException, NotExpertException;
	public void deleteRuleSet(String name) throws RemoteException, FirewallException, ReadWriteException, NotExpertException;
	public String[] getRuleSets() throws RemoteException, FirewallException;
	public void setRuleSet(String name) throws RemoteException, FirewallException, ReadWriteException;
	public String getCurrentRuleSet() throws RemoteException;
	
	public Log[] getLogs(int days) throws RemoteException, FirewallException;
	public Log[] getLogs(int days, String address, Integer port, Log.directOpt dir) throws RemoteException, FirewallException;
	public Log[] getLogs(int days, String protocol) throws RemoteException, FirewallException;
	
	public GlobalLog[] getGlobalLogs(int days) throws RemoteException, FirewallException;
}
